package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 退款
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_park_refund")
public class ParkRefund extends Model<ParkRefund> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "refund_order_id", type = IdType.ASSIGN_ID)
    private String refundOrderId;
    /**
     * 订单ID
     */
    @TableField("order_id")
    private String orderId;
    /**
     * 订单金额
     */
    @TableField("order_amount")
    private BigDecimal orderAmount;
    /**
     * 实际支付金额
     */
    @TableField("pay_amount")
    private BigDecimal payAmount;
    /**
     * 退款金额
     */
    @TableField("refund_amount")
    private BigDecimal refundAmount;
    /**
     * 行程类型:0停车1充电2加油3短租
     */
    @TableField("trip_type")
    private Integer tripType;
    /**
     * 处理情况:0未处理1已退款2拒绝退款
     */
    @TableField("handling_situation")
    private Integer handlingSituation;
    /**
     * 接收时间
     */
    @TableField("receive_time")
    private LocalDateTime receiveTime;
    /**
     * 处理时间
     */
    @TableField("handling_time")
    private LocalDateTime handlingTime;
    /**
     * 申请时间
     */
    @TableField("add_time")
    private LocalDateTime addTime;
    /**
     * 操作人
     */
    @TableField("operator")
    private String operator;
    /**
     * 机构ID
     */
    @TableField("org_id")
    private String orgId;
    /**
     * 用户ID
     */
    @TableField("user_id")
    private String userId;
    /**
     * 手机号
     */
    @TableField("mobile")
    private String mobile;

    public void freeData() {
        this.refundOrderId = null;
        this.orderId = null;
        this.orderAmount = null;
        this.payAmount = null;
        this.refundAmount = null;
        this.tripType = null;
        this.handlingSituation = null;
        this.receiveTime = null;
        this.handlingTime = null;
        this.addTime = null;
        this.operator = null;
        this.orgId = null;
        this.userId = null;
        this.mobile = null;
    }

}
